package com.dubbo.service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.api.ProviderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date 2021/5/31 15:25
 */
@RestController
public class Consume {

    @Reference
    private ProviderService providerService;

    @GetMapping(value = "/hello/{name}")
    public String hello(@PathVariable String name) {
        return providerService.getName(name);
    }
}
